<title>旺进财</title>
#@homejs()


<style>
html, body { font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;}
ul, ol { padding: 0;}
.banner { position: relative; overflow: auto; text-align: center;}
.banner li { list-style: none; }
.banner ul li { float: left; }
#b04 { width: 100%;height:auto;}
#b04 .dots { position: absolute; left: 0; right: 0; bottom: 20px;}
#b04 .dots li 
{ 
	display: inline-block;  
	width: 10px; 
	height: 10px; 
	margin: 0 4px; 
	text-indent: -999em; 
	border: 2px solid #fff; 
	border-radius: 6px; 
	cursor: pointer; 
	opacity: .4; 
	-webkit-transition: background .5s, opacity .5s; 
	-moz-transition: background .5s, opacity .5s; 
	transition: background .5s, opacity .5s;
}
#b04 .dots li.active 
{
	background: #fff;
	opacity: 1;
}
#b04 .arrow { position: absolute; top: 200px;}
#b04 #al { left: 15px;}
#b04 #ar { right: 15px;}


.hdinfo span{
    text-indent: 20px;
}
.hdinfo {
    width: 260px;
}
</style>
<body bgcolor="#fafafa" style="margin:0px;">
	#@homemenu("index") 
	<!--轮播图--> 
	<div class="banner" id="b04" style="margin-top:-15px;width:100%">
		<ul id="slides">
			
		</ul>
		<a href="javascript:void(0);" class="unslider-arrow04 prev"><img class="arrow" style="left:50px;" id="al" src="#(path)/assets/home/index/arrowl.png" alt="prev" width="20" height="35"></a>
		<a href="javascript:void(0);" class="unslider-arrow04 next"><img class="arrow" style="right:50px;" id="ar" src="#(path)/assets/home/index/arrowr.png" alt="next" width="20" height="37"></a>
	</div>
	<!--平台数据-->
	<div align="center" style="width:100%;height:100px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div align="left" style="width:1100px;padding-top:15px;"> 
			<div  style="width:1100px;height:50px;line-height:40px;">
				<div style="color:#939393;width:350px;float:left;line-height:80px;font-size:18px;">
					<span>旺进财借贷信息中介平台</span>
				</div>
				<div style="width:280px;float:left">
					<div style="line-height:30px;color:#939393">累计成交</div>
					<div id="total_bid_amount" style="line-height:40px;font-size:20px;color:#fb4357"></div>
				</div>
				<div style="width:280px;float:left">
					<div style="line-height:30px;color:#939393">为用户赚取收益</div>
					<div id="total_repay_amount" style="line-height:40px;font-size:20px;color:#fb4357"></div>
				</div>
				<div style="width:160px;float:left;">
					<div style="line-height:30px;color:#939393">注册人数</div>
					<div id="total_users" style="line-height:40px;font-size:20px;color:#fb4357"></div>
				</div>
				<!--<div align="left" style="width:200px;float:left;margin-left:60px;">
					<div style="line-height:30px;color:#939393">安全运营时间</div>
					<div id="total_run_days" style="line-height:40px;font-size:20px;color:#fb4357"></div> 
				</div>
				<div onclick="window.open('/account-reportinfo')" align="right" style="width:100px;float:left;"> 
					<div style="cursor:pointer;line-height:70px;color:#939393;font-size:16px">运营报告 <img style="width:18px;" src="#(path)/assets/home/jiantou.png"></div>
				</div>-->
			</div>
		</div>
	</div>
	<!--短期标的-->
	<div align="center" style="margin-top:20px;width:100%;height:406px;background:#fafafa">
		<div align="left" style="width:1100px;height:40px;"> 
			<span style="font-weight:400;font-size:24px;">崭露头角</span>
			<span style="font-weight:400;font-size:18px;margin-left:30px;color:#939393">期限灵活，存取便捷收益快</span>
		</div>
		<div align="left" style="width:1100px;height:366px;background:#FFF">
			<div style="width:220px;float:left">
				<img style="width:100%;height:100%" src="#(path)/assets/home/index/index_tiantian.png">
			</div>
			<div id="shorts">
			</div>
			
		</div>
	</div>
	<!--活动图-->
	<div align="center" style="margin-top:20px;width:100%;height:230px;background:#fafafa">
		<div align="left" style="width:1100px;height:230px;">
			<img style="width:100%;height:100%" src="#(path)/assets/home/index/index_hd2.png">
		</div>
	</div>
	<!--中期标的-->
	<div align="center" style="margin-top:20px;width:100%;height:406px;background:#fafafa">
		<div align="left" style="width:1100px;height:40px;"> 
			<span style="font-weight:400;font-size:24px;">大显身手</span>
			<span style="font-weight:400;font-size:18px;margin-left:30px;color:#939393">产品丰富，自由搭配分散投</span>
		</div>
		<div align="left" style="width:1100px;height:366px;background:#FFF;">
			<div style="width:220px;float:left">
				<img style="width:100%;height:100%" src="#(path)/assets/home/index/index_yueyue.png">
			</div>
			<div id="middles">
			</div>
		</div>
	</div> 
	<!--长期标的
	<div align="center" style="margin-top:50px;width:100%;height:406px;background:#fafafa">
		<div align="left" style="width:1100px;height:40px;"> 
			<span style="font-weight:400;font-size:24px;">生财有道</span>
			<span style="font-weight:400;font-size:18px;margin-left:30px;color:#939393">月月付息，长期稳定收益稳</span>
		</div>
		<div align="left" style="width:1100px;height:366px;background:#FFF">
			<div style="width:220px;float:left">
				<img style="width:100%;height:100%" src="#(path)/assets/home/index/index_niannian.png">
			</div>
			<div id="longs">
			</div>
		</div>
	</div>-->
	<!--活动条例展示-->
	<div align="center" style="margin-top:20px;width:100%;height:315px;background:#fafafa">
		<div align="left" style="width:1060px;height:265px;padding:10px 20px;background:#FFF"> 
			<div style="width:650px;height:265px;float:left;border-right:1px solid #d5d5d5">
				<div style="font-size:16px;width:620px;line-height:40px;border-bottom:1px solid #F0F0F0">
					<span class="index_newmenu index_newmenu2">新闻动态</span>
					<span class="index_newmenu">公告通知</span>
				</div> 
				<!--公司动态-->
				<div  class="newsl newslone" style="padding-top:0px;">
					<div style="float:left;height:215px;width:350px;">
						<img id="gsdtimg" style="cursor:pointer;width:100%;height:100%" src="">
					</div>
					<div id="gsdt" style="float:right;width:280px;height:170px;"> 
					</div>
					<div onclick="window.location.href='/account-account?type=usernews'" style="font-size:13px;cursor:pointer;float:right;color:#fb4357;margin:20px 20px 0 0;">更多 <img height="13px" src="/assets/home/hs_jt.png"></div>
				</div>
				
				<!--公司公告-->
				<div hidden class="newsl newslthree" style="padding-top:0px;">
					<div style="float:left;height:215px;width:350px;"> 
						<img id="gsggimg" style="cursor:pointer;width:100%;height:100%" src="">
					</div>
					<div id="gsgg" style="float:right;width:280px;height:170px;">
					</div>
					<div onclick="window.location.href='/account-account?type=usernotice'" style="font-size:13px;cursor:pointer;float:right;color:#fb4357;margin:20px 20px 0 0;">更多 <img height="13px" src="/assets/home/hs_jt.png"></div>
				</div>
			</div>
			<!--右边-->
			<div align="left" style="width:365px;height:265px;float:left;margin-left:20px;">
				<div style="height:40px;line-height:40px;border-bottom:1px solid #F0F0F0">
					<span style="float:left;color:#fb4357;">活动详情</span>
					<span onclick="window.location.href='/account-account?type=useractive'" style="font-size:13px;cursor:pointer;float:right;color:#fb4357;">更多 <img height="13px" src="/assets/home/hs_jt.png"></span>    
				</div>
				<div id="activeinfos" style="font-size:14px;">
					
				</div>
			</div>
		</div> 
	</div>
	<div align="center" style="width:100%;height:100px;padding-bottom:30px;">
		<div align="left" style="width:1100px;height:40px;"> 
			<span style="font-weight:400;font-size:18px;">合作机构</span>
		</div>
		<!--<div id="colee_left" style="overflow:hidden;width:1100px;">
			<table cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td id="colee_left1" valign="top" align="center">
						<table cellpadding="2" cellspacing="0" border="0">
						<tr align="center">
						<td><a target="_blank" href="http://www.cecdc.com/"><img width="130px; " src="#(path)/assets/home/index/hz1.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="https://pay.sina.com.cn/zjtg/#firstPage"><img width="130px; " src="#(path)/assets/home/index/sina.png"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="http://app.meizu.com/"><img width="130px; " src="#(path)/assets/home/index/meizu.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="http://www.mumayi.com/"><img width="130px; " src="#(path)/assets/home/index/mumayi.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="https://dev.vivo.com.cn/"><img width="130px; " src="#(path)/assets/home/index/vivo.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="http://app.mi.com/"><img width="130px; " src="#(path)/assets/home/index/xiaomi.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="http://sj.qq.com/"><img width="130px; " src="#(path)/assets/home/index/yyb.jpg"></a>&nbsp;&nbsp;</td>
						<td><a target="_blank" href="http://www.anzhi.com/"><img width="130px; " src="#(path)/assets/home/index/anzhi.jpg"></a>&nbsp;&nbsp;</td>
						</tr>
						</table>
					</td>
					<td id="colee_left2" valign="top"></td>
				</tr>
			</table>
		</div>-->
		<div align="left" style="position:relative;width:1100px;overflow:hidden;">
			<div id="hzhb">
				<a target="_blank" href="http://www.cecdc.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/hz1.jpg"></a>
				<a target="_blank" href="https://pay.sina.com.cn/zjtg/#firstPage"><img width="130px;"style=" margin-right:10px; " src="#(path)/assets/home/index/sina.png"></a>
				<a target="_blank" href="http://www.anzhi.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/anzhi.jpg"></a>
				<a target="_blank" href="http://app.meizu.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/meizu.jpg"></a>
				<a target="_blank" href="http://www.mumayi.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/mumayi.jpg"></a>
				<a target="_blank" href="https://dev.vivo.com.cn/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/vivo.jpg"></a>
				<a target="_blank" href="http://app.mi.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/xiaomi.jpg"></a>
				<a target="_blank" href="http://sj.qq.com/"><img width="120px;"style="margin-right:10px; " src="#(path)/assets/home/index/yyb.jpg"></a>
			</div> 
		</div>
	</div>
	
	#@homefoot1()
	#@homefoot2()
</body> 
<script id="demo" type="text/x-jquery-tmpl">
	<div align="center" style="width:439px;float:left;margin-top:30px;">
		<div style="font-size:20px;padding-top:20px;">
			${name} 
		</div>
		<div style="padding-top:20px;"> 
			<span style="color:#fb4357;font-size:50px;">${rate}%</span>
			<span style="color:#ff6f4d;font-size:32px;">${plus_rate}</span>
		</div>
		<div style="padding-top:20px;">
			<span ${firsthid}  class="index_biaodi">${day_limit}天期限</span> 	
			<span ${firsthid}  class="index_biaodi">剩余可投${shengyu}</span> 
			<span ${firsthid}  class="index_biaodi">每份${unit_amount}元</span>  
		</div>
		<div style="padding-top:30px;">
			<div style="float:left;width:250px;height:32px;overflow:hidden;margin-left:90px"> 
				<div style="overflow:hidden;position:relative;float:left;margin-top:5px;height:4px;width:100%;background:#fa3048">
					<div id="jindu${id}" style="position:relative;float:left;height:4px;width:100%;background:#eee"></div>
				</div>   
			</div>
			<div style="height:20px;line-height:20px;float:left;margin-left:10px;font-size:16px;color:#939393">${jindu}%</div>
		</div>
		<div  style="width:100%;height:50px;margin-top:40px;"> 
			<input onclick="window.location.href='${linkopen}'" style="cursor:pointer;border:1px solid ${color1};border-radius:10px;color:${color1};height:35px;width:250px;font-size:16px;background:#fff" value="${name1}" type="button"  />
		</div> 
	</div> 
</script>
<script id="demo1" type="text/x-jquery-tmpl"> 
	<div style="float:right;width:280px;">
		<div onclick="window.open('${linkopen}')" class="onellipsis" style="font-size:15px;cursor:pointer;width:260px;font-weight:400;height:36px;line-height:36px;border-bottom:1px dashed #e0e0e0">${name}</div>
	</div> 
</script>
<script id="demo2" type="text/x-jquery-tmpl">
	<div onclick="window.open('${linkopen}')" style="border-bottom:1px dashed #e0e0e0;cursor:pointer;width:365px;clear:both;height:30px;line-height:30px;"> 
		<div style="float:left;width:200px;" class="onellipsis" >${name}</div>
		<div align="right"style="float:right;width:160px;color:#939393">${create_time}</div> 
	</div>
</script>
<script>
	$(document).ready(function(e) {
		//轮播
		$.getJSON("#(path)/slider/list?type=web*all&status=enable", function(sliderinfo){ 
			$.each(sliderinfo.data.list, function(i, item){ 
				$("#slides").append("<li><a href='"+item.pc_link+"' target='_blank'><img src='"+item.image+"' style='cursor:pointer' alt='' width='100%' height='450px' ></a></li>");
			});
			var unslider04 = $('#b04').unslider({
			dots: true
			}), 
			data04 = unslider04.data('unslider');
			$('.unslider-arrow04').click(function() {
				var fn = this.className.split(' ')[1];
				data04[fn]();
			});
		}); 

		//头部旺进财总数据
		$.getJSON("#(path)/sys/statistics", function(statisticsinfo) {
			var  statisticsinfo = statisticsinfo.data;
			$("#total_repay_amount").html(formatNum(statisticsinfo.total_repay_amount.toString())+"元");
			$("#total_run_days").html(statisticsinfo.total_run_days+"天");
			$("#total_bid_amount").html(formatNum(statisticsinfo.total_bid_amount.toString())+"元");
			$("#total_users").html(statisticsinfo.total_users+"人");
			function formatNum(str){
				var newStr = "";
				var count = 0;
				if(str.indexOf(".")==-1){
				   for(var i=str.length-1;i>=0;i--){
				 if(count % 3 == 0 && count != 0){
				   newStr = str.charAt(i) + "," + newStr;
				 }else{
				   newStr = str.charAt(i) + newStr;
				 }
				 count++;
				   }
				   str = newStr + ".00"; //自动补小数点后两位
				   return str;
				}
				else
				{
				   for(var i = str.indexOf(".")-1;i>=0;i--){
				 if(count % 3 == 0 && count != 0){
				   newStr = str.charAt(i) + "," + newStr;
				 }else{
				   newStr = str.charAt(i) + newStr; //逐个字符相接起来
				 }
				 count++;
				   }
				   str = newStr + (str + "00").substr((str + "00").indexOf("."),3);
				   return str;
				}
			}
		}); 
		
		$.getJSON("#(path)/home", function(homeinfo) {
			$.each(homeinfo.data.shorts, function(i, item){ 
				var jindu = (Number(item.avunit) * Number(item.unit_amount)*100/ Number(item.amount)).toFixed(2);
				if(item.plus_rate=="0.0"){
					var plus_rate = "";
				}else{
					var plus_rate = "+"+item.plus_rate+"%";
				}
				if(item.type == "experi"){
					var shengyu = (Number(item.unit)-Number(item.avunit)).toFixed(2)+"元";
				}else { 
					var shengyu = Number(item.unit)-Number(item.avunit)+"份";
				}
				var linkopen = "#(path)/trade-tradeinfo?id="+item.id; 
				if(item.status=="trading"){
					var color1 = "#fd4456";
					var name1 = "立即投资"; 
				}else if(item.status=="waiting"){
					var color1 = "#ecb02f";
					var name1 = "未开始"; 
				}else if(item.status=="full"){
					var color1 = "#fd4456";
					var name1 = "已满标"; 
				}else if(item.status=="repaying"){
					var color1 = "#aeaeae"; 
					var name1 = "还款中";  
				}
				var invests = {plus_rate:plus_rate,color1:color1,name1:name1,linkopen:linkopen,jindu:jindu,id:item.id,shengyu:shengyu,unit_amount:item.unit_amount,day_limit:item.day_limit,name:item.name,rate:item.rate}; 
				$("#demo").tmpl(invests).appendTo('#shorts');
				$("#jindu"+item.id).animate({left:jindu+'%'},1000); 
			});
			$.each(homeinfo.data.middles, function(i, item){ 
				var jindu = (Number(item.avunit) * Number(item.unit_amount)*100/ Number(item.amount)).toFixed(2);
				if(item.plus_rate=="0.0"){
					var plus_rate = "";
				}else{
					var plus_rate = "+"+item.plus_rate+"%";
				}
				if(item.type == "experi"){
					var shengyu = (Number(item.unit)-Number(item.avunit)).toFixed(2)+"元";
				}else { 
					var shengyu = Number(item.unit)-Number(item.avunit)+"份";
				}
				var linkopen = "#(path)/trade-tradeinfo?id="+item.id; 
				if(item.status=="trading"){
					var color1 = "#fd4456";
					var name1 = "立即投资"; 
				}else if(item.status=="waiting"){
					var color1 = "#ecb02f";
					var name1 = "未开始"; 
				}else if(item.status=="full"){
					var color1 = "#fd4456";
					var name1 = "已满标"; 
				}else if(item.status=="repaying"){
					var color1 = "#aeaeae"; 
					var name1 = "还款中";  
				}
				var invests = {plus_rate:plus_rate,linkopen:linkopen,color1:color1,name1:name1,jindu:jindu,id:item.id,shengyu:shengyu,unit_amount:item.unit_amount,day_limit:item.day_limit,name:item.name,rate:item.rate}; 
				$("#demo").tmpl(invests).appendTo('#middles');
				$("#jindu"+item.id).animate({left:jindu+'%'},1000); 
			});
			$.each(homeinfo.data.longs, function(i, item){ 
				var jindu = (Number(item.avunit) * Number(item.unit_amount)*100/ Number(item.amount)).toFixed(2);
				if(item.plus_rate=="0.0"){
					var plus_rate = "";
				}else{
					var plus_rate = "+"+item.plus_rate+"%";
				}
				if(item.type == "experi"){
					var shengyu = (Number(item.unit)-Number(item.avunit)).toFixed(2)+"元";
				}else { 
					var shengyu = Number(item.unit)-Number(item.avunit)+"份";
				}
				var linkopen = "#(path)/trade-tradeinfo?id="+item.id; 
				if(item.status=="trading"){
					var color1 = "#fd4456";
					var name1 = "立即投资"; 
				}else if(item.status=="waiting"){
					var color1 = "#ecb02f";
					var name1 = "未开始"; 
				}else if(item.status=="full"){
					var color1 = "#fd4456";
					var name1 = "已满标"; 
				}
				var invests = {plus_rate:plus_rate,color1:color1,name1:name1,jindu:jindu,id:item.id,shengyu:shengyu,unit_amount:item.unit_amount,day_limit:item.day_limit,name:item.name,rate:item.rate}; 
				$("#demo").tmpl(invests).appendTo('#longs');  
				$("#jindu"+item.id).animate({left:jindu+'%'},1000);  
			});
			//公司公告动态内容填充
			//右边
			if(!$.isBlank(homeinfo.data.activitys.list)){
				$.each(homeinfo.data.activitys.list, function(i, item){ 
					var linkopen = "/account-activeinfo?id="+item.id; 
					var create_time = (item.create_time).substring(0,10);
					var invests = {linkopen:linkopen,name:item.name,create_time:create_time}; 
					$("#demo2").tmpl(invests).appendTo('#activeinfos');  
				});
			}
			//左边
			if(!$.isBlank(homeinfo.data.news.list)){
				$.each(homeinfo.data.news.list,function(i,item){
					if(!$.isBlank(item.image)){
						$("#gsdtimg").attr("src",item.image);
						$("#gsdtimg").click(function(){
							window.open("/account-newsinfo?id="+item.id);
						});
						return; 
					}
				});
				$.each(homeinfo.data.news.list, function(i, item){ 
					var linkopen = "/account-newsinfo?id="+item.id;
					var invests = {linkopen:linkopen,name:item.name,contents:item.contents}; 
					$("#demo1").tmpl(invests).appendTo('#gsdt');  
				});
			}
			if(!$.isBlank(homeinfo.data.notices.list)){ 
				$.each(homeinfo.data.notices.list,function(i,item){
					if(!$.isBlank(item.image)){
						$("#gsggimg").attr("src",item.image); 
						$("#gsggimg").click(function(){
							window.open("/account-newsinfo?id="+item.id);
						}); 
						return;
					}
				});
				$.each(homeinfo.data.notices.list, function(i, item){ 
					var linkopen = "/account-newsinfo?id="+item.id;
					var invests = {linkopen:linkopen,name:item.name,contents:item.contents}; 
					$("#demo1").tmpl(invests).appendTo('#gsgg');  
				});
			}
			
		});  
	});
	//新闻左下角点击交换 
	$(".index_newmenu").click(function(){
		$(".index_newmenu").removeClass("index_newmenu2");
		var newtitle = $(this).html();
		$(this).addClass("index_newmenu2");
		if(newtitle=="新闻动态"){
			$(".newsl").hide();
			$(".newslone").show();
		}else if(newtitle=="公告通知"){
			$(".newsl").hide();
			$(".newslthree").show();
		}
	});
//截取中英字符串 
	$(function (){
		var list = $(".hdinfo");
		list.each(function(index, element) {
			var str = $(this).text();
			$(this).text(cutStr(str,70)+'...');
		});	
	});
//截取中英字符串 双字节字符长度为2 ASCLL字符长度为1
	function cutStr(str,cutLen){
		var returnStr = '',    //返回的字符串
			reCN = /[^\x00-\xff]/,    //双字节字符
			strCNLen = str.replace(/[^\x00-\xff]/g,'**').length; 
		if(cutLen>=strCNLen){
			return str;
		}
		for(var i=0,len=0;len<cutLen;i++){
			returnStr += str.charAt(i);
			if(reCN.test(str.charAt(i))){
				len+=2;
			}else{
				len++;
			}
		}
		return returnStr;
	}

	var speed=30//速度数值越大速度越慢
	var colee_left2=document.getElementById("colee_left2");
	var colee_left1=document.getElementById("colee_left1");
	var colee_left=document.getElementById("colee_left");
	colee_left2.innerHTML=colee_left1.innerHTML
	function Marquee3(){
	if(colee_left2.offsetWidth-colee_left.scrollLeft<=0)//offsetWidth 是对象的可见宽度
	colee_left.scrollLeft-=colee_left1.offsetWidth//scrollWidth 是对象的实际内容的宽，不包边线宽度
	else{
	colee_left.scrollLeft++
	}
	}
	var MyMar3=setInterval(Marquee3,speed)
	colee_left.onmouseover=function() {clearInterval(MyMar3)}
	colee_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}


</script>
